#—*—coding:utf-8 -*-
#@Time        :2022/7/16 17:08
#@Author      :dhx
#@File        :station_gonggao_page.py
# @Software: PyCharm
from time import sleep

from selenium.webdriver.common.by import By
from pages.base_pageage import BasePage

class GonggaoPage(BasePage):
    url='http://192.168.3.133/crm/index.php?m=announcement&a=index'
    add_locator = (By.XPATH, '/html/body/div[5]/div[2]/div[1]/div[2]/a')
    neirong_locator = (By.ID, 'notepad')
    add_task_locator = (By.CSS_SELECTOR, '#calendar > div.c-event-grid > div.c-task-body > div.data-head > a > i')

    def add_goggao(self):
        """添加公告"""
        self.driver.find_element(*self.add_locator).click()
    def note_add(self):
        """添加便签"""
        self.driver.find_element(* self.neirong_locator).send_keys("公告")
        sleep(2)

    def day_add(self):
        """找到日程"""
        self.driver.find_element(*self.add_task_locator).click()
        sleep(2)




